﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace BCDto.Common.Dictionary
{
    /// <summary>
    /// 字典请求模型
    /// </summary>
    public class DictionaryReferenceRequestDto
    {
        /// <summary>
        /// 引用名称
        /// </summary>
        [Required(ErrorMessage = "引用名称为必填项")]
        [StringLength(150, ErrorMessage = "请勿输入超过 150 个字")]
        public string Name { get; set; }

        /// <summary>
        /// 引用类型名称
        /// </summary>
        //[Required(ErrorMessage = "引用类型名称为必填项")]
        //[StringLength(49, ErrorMessage = "请勿输入超过 49 个字")]
        public string TypeName { get; set; }

        //TODO:缺英文验证
        /// <summary>
        /// 引用父名称
        /// </summary>
        //[Required(ErrorMessage = "引用父名称为必填项")]
        //[StringLength(50, ErrorMessage = "请勿输入超过 50 个字")]
        public string ParentName { get; set; }

        /// <summary>
        /// 引用值（对应中文名称）
        /// </summary>
        [Required(ErrorMessage = "引用值中文名称为必填项")]
        [StringLength(48, ErrorMessage = "请勿输入超过 48 个字")]
        public string ItemValue { get; set; }

        /// <summary>
        /// 引用类型值（对应中文类型名称）
        /// </summary>
        //[Required(ErrorMessage = "引用类型值中文名称为必填项")]
        //[StringLength(50, ErrorMessage = "请勿输入超过 50 个字")]
        public string TypeValue { get; set; }

        /// <summary>
        /// 引用组值（对应中文父名称）
        /// </summary>
        //[Required(ErrorMessage = "引用组值中文名称为必填项")]
        //[StringLength(50, ErrorMessage = "请勿输入超过 50 个字")]
        public string GroupValue { get; set; }

        /// <summary>
        /// 引用名称备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 允许编辑
        /// </summary>
        [Required(ErrorMessage = "允许编辑为必填项")]
        public bool AllowEdit { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 编辑人
        /// </summary>
        public string Editer { get; set; }
    }
}